const transferData = {
  cooperativeSearch: null,
  isRefreshCooperation: null, //合作房源列表页需要更新数据
  commonSearch: null,
  currentCity: null,
  isRefreshSubscribe: null,
  isRefreshMySubscribe: null,
  isRefreshSubscribeArea: null,
  // isRefreshCooperationSetting: null,
  selectHouseAreaEnterNextPage: null, //选择小区后进入哪个房源信息编辑页面
  selectJLtype: {}, //奖励三选一来用于和上一页面通信
  selectJLtype_goodFriend: null,
  chooseRewEntr: {}, //记录选择奖励成功后弹窗点击事件
  visitorsDefaultTab: "", // 获客进入默认tab
  fromUserId: "", //分享人的id
  //认证的卡片信息（带入IM聊天）
  authCardInfo: null,
};

const setData = (key, data) => {
  if (transferData.hasOwnProperty(key)) {
    transferData[key] = data;
  }
};

const getData = (key) => {
  return transferData[key];
};

const resetData = (key) => {
  transferData[key] = null;
};

const transferTemporaryData = {};

const setTemporaryData = (key, data) => {
  transferTemporaryData[key] = data;
};

const getTemporaryData = (key) => {
  return transferTemporaryData[key];
};

const resetTemporaryData = (key) => {
  transferTemporaryData[key] = null;
};

export { setData, getData, resetData, setTemporaryData, getTemporaryData, resetTemporaryData };
